/**
 * $Revision: 1.0 $
 * $Author: Eric Yang $
 * $Date: Oct 20, 2009 1:10:42 AM $
 *
 * Author: Eric Yang
 * Date  : Oct 20, 2009 1:10:42 AM
 *
 */
package com.gooex.web.action.gbuy.common;

import java.util.ArrayList;
import java.util.List;

import com.gooex.domain.base.TempCategory;
import com.gooex.service.base.IOrderManager;
import com.gooex.web.action.AjaxableAction;


/**
 * @author Eric Yang
 * @version 1.0
 */
public class OrderCountAcion extends AjaxableAction {

	private IOrderManager orderManager;

	private String name;

	private int level;

	private List<TempCategory> categories = new ArrayList<TempCategory>();

	public String execute() throws Exception {
		if (name == null)
			categories = orderManager.getCategoryCount(null, name, null, level);
		return SUCCESS;
	}

	public List<TempCategory> getCategories() {
		return categories;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setOrderManager(IOrderManager orderManager) {
		this.orderManager = orderManager;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

}
